import time
from math import *
def Bob (z):
    x = time.time()
    a = open(z)
    b = []
    for i in a:
        b.append(a.readline())
    for q in range(len(b)):
        for j in range(len(b)-1):
            if b[j] < b[j+1]:
                b[j],  b[j+1] = b[j+1], b[j]
    y = time.time()
    return(y - x)

print('m1_sorted', int(round(Bob('m1_sorted.txt'), 3) * 1000), 'milliseconds')
print('m2_reverse', int(round(Bob('m2_reverse.txt'), 3) * 1000), 'milliseconds')
print('m3_shuffle', int(round(Bob('m3_shuffle.txt'), 3) * 1000), 'milliseconds')
